<?php

namespace Database\Factories;

use Illuminate\Database\Eloquent\Factories\Factory;

class MasterFactory extends Factory
{
    /**
     * Define the model's default state.
     *
     * @return array
     */
    public function definition()
    {
        $r=random_int(0,1);
        $usernames = array('john', 'jane', 'jim', 'jay', 'jenny', 'julie');
        $domains = array('gmail.com', 'qq.com', 'yahoo.com', 'outlook.com');
        $username = $usernames[rand(0, count($usernames)-1)];
        $domain = $domains[rand(0, count($domains)-1)];
        $email = $username . '@' . $domain;
        return [
            'name'=>$this->faker->name(),
            'email'=>$email,
            'keshi'=>$r==0?'内科':'外科',
            'zhicheng'=>'主任医师',
            'zhiwu'=>'主任',
            'hospital'=>'医院',
            'show'=>$this->faker->paragraphs(2,true),
        ];
    }
}
